list1 = input().split(" ")
list1.sort()
a= list1[:list1.index('60')]
print(sum(a))   
